package com.boot.web.dao;

import com.boot.web.dto.AppMailListDTO;
import com.boot.web.dto.PrizePoolCustomerDTO;
import com.boot.web.entity.Customer;
import com.boot.base.dao.BaseDao;
import com.boot.web.vo.CustomerVO;
import com.boot.web.vo.CustomerVO1;
import com.boot.web.vo.CustomerVO_1;
import com.boot.web.vo.app.AppAccountNumberVO;
import com.boot.web.vo.app.AppCustomerVO;
import com.boot.web.vo.app.AppMailListVO;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 客户信息数据层接口
 * @author 【zhouJie】
 * @date 2021-06-02 08:43:22
 */
public interface CustomerDao extends BaseDao<Customer> {

    List<CustomerVO_1> queryCustomerVOPageList(Map<String, Object> map);

    List<CustomerVO> queryAllVO();

    Customer queryCustomerByMobile(String mobile);

    Customer queryCustomerByToken(String token);

    Customer queryCustomerByAgentCode(String agentCode);

    List<AppMailListVO> queryCustomerByAgentCode_1(String agentCode);

    Customer queryCustomerByLoginName(String loginName);

    Customer queryCustomerByUnionId(String unionId);

    CustomerVO queryCustomerVOById(Integer userId);

    List<Customer> queryCustomerByParentId(Integer userId);

    List<CustomerVO> queryCustomerVOByParentId(Integer userId);

    Customer queryCustomerByOpenId(String openId);

    List<Customer> queryCustomerByLevelCopyId(@Param("levelCopyId") Integer levelCopyId, @Param("parentId") Integer parentId);

    List<Customer> queryCustomerByLevelCopyId_supreme(@Param("levelCopyId") Integer levelCopyId, @Param("parentId") Integer parentId);
    List<Customer> queryCustomerByLevelCopyId_theKing(@Param("levelCopyId") Integer levelCopyId, @Param("parentId") Integer parentId);
    List<Customer> queryCustomerByLevelCopyId_killer(@Param("levelCopyId") Integer levelCopyId, @Param("parentId") Integer parentId);

    List<Customer> queryCustomerByLevelCopyId1(@Param("levelCopyId") Integer levelCopyId, @Param("parentId") Integer parentId);

    List<Customer> queryCustomerByLevelCopy4Id(@Param("levelCopy4Id") Integer levelCopy4Id, @Param("parentId") Integer parentId);

    List<Customer> queryByLevelCopyId(Integer levelCopyId);

    BigDecimal queryByTotalAchievement(Integer levelCopyId);

    List<CustomerVO1> queryByParentId(Integer userId); // 邀请的下级

    CustomerVO1 queryById1(Integer userId); // 我的上级

    CustomerVO1 queryById2(String agentCode); // 查询客户

    int queryCustomerByLevelIdAndParentId(@Param("levelId") Integer levelId, @Param("parentId") Integer parentId);

    int queryCustomerByLevelIdAndParentId_1(@Param("levelId") Integer levelId, @Param("parentId") Integer parentId);

    List<Customer> queryByEmptyAchievement();

    int queryBySumQuantityRecord(Integer userId);

    List<Customer> queryByFiction(); // 获取虚拟的人

    List<Customer> queryByNoFiction();

    List<Customer> queryByIsNotFictionOr1198();

    List<Customer> queryAll1();
    List<Customer> queryAll2();

    List<AppAccountNumberVO> queryCustomerByMasterAccount(@Param("masterAccount") String masterAccount, @Param("userId") Integer userId);

    List<AppAccountNumberVO> queryCustomerByMasterAccount5(String masterAccount);

    int queryByOrderQuantity50(Integer userId);

    int queryByOrderQuantityTotal(Integer userId);

    int queryByLevelV1(@Param("levelCopy4Id") Integer levelCopy4Id, @Param("parentId") Integer parentId);
    int queryByLevelV2(@Param("levelCopy4Id") Integer levelCopy4Id, @Param("parentId") Integer parentId);
    int queryByLevelV3(@Param("levelCopy4Id") Integer levelCopy4Id, @Param("parentId") Integer parentId);
    int queryByLevelV4(@Param("levelCopy4Id") Integer levelCopy4Id, @Param("parentId") Integer parentId);
    int queryByLevelV5(@Param("levelCopy4Id") Integer levelCopy4Id, @Param("parentId") Integer parentId);

    List<AppMailListVO> queryByMailList(Integer userId);

    List<AppMailListDTO> queryByMailList_1(Integer userId);

    List<AppMailListVO> queryByMailList_parent(Integer parentId);

    int queryTeamBySign(Integer sign);

    List<PrizePoolCustomerDTO> queryByTodayArean();

    List<Customer> queryByLevelCopyId3_3();
    List<Customer> queryByLevelCopyId3_4();

    List<Customer> queryByTodayArean_1();

    List<Customer> queryByTodayAreanAll();

}
